package com.example.consumer.controller;

import com.example.demo.service.DemoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: yangzhiwei
 * @Date: 2021/9/13 11:13
 */
@RestController
public class TestController {
    @DubboReference(group = "DUBBO",version = "1.0.0")
    DemoService demoService;

    @GetMapping("/test/{name}")
    public String test(@PathVariable String name){
        System.out.println(demoService);
        demoService.sayName(name);
        return name;
    }
}
